package com.web.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//定义当前类是rest风格的控制器，直接将数据返回给客户端
@RestController
public class HelloController {

    //定义请求映射  /hello  ---> hello()方法
    @RequestMapping("/hello")
    public String hello(){
        return "Hello! SpringMVC";
    }
}
